// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_RL_SO_APP
// * CreateDate    : 2014-06-05 18:30:37
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:37
// * LastChanger   : 2014-06-05 18:30:37
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class SalesRlSoAppEntity : EntityBase
    {
        public SalesRlSoAppTable TableSchema
        {
            get
            {
                return SalesRlSoAppTable.Current;
            }
		}
		
		public SalesRlSoAppEntity()
        {

        }
		
		public SalesRlSoAppEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.SoId = Convert.ToString(CommonFunctions.ToObject(dr["SO_ID"]));
			this.SoItemId = Convert.ToString(CommonFunctions.ToObject(dr["SO_ITEM_ID"]));
            this.SoItemQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["SO_ITEM_QTY"]));
			this.AppId = Convert.ToString(CommonFunctions.ToObject(dr["APP_ID"]));
			this.AppItemId = Convert.ToString(CommonFunctions.ToObject(dr["APP_ITEM_ID"]));
            this.AppItemQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["APP_ITEM_QTY"]));
        }
		
		public SalesRlSoAppEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.SoId = Convert.ToString(CommonFunctions.ToObject(dr["SO_ID"]));
			this.SoItemId = Convert.ToString(CommonFunctions.ToObject(dr["SO_ITEM_ID"]));
            this.SoItemQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["SO_ITEM_QTY"]));
			this.AppId = Convert.ToString(CommonFunctions.ToObject(dr["APP_ID"]));
			this.AppItemId = Convert.ToString(CommonFunctions.ToObject(dr["APP_ITEM_ID"]));
            this.AppItemQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["APP_ITEM_QTY"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesRlSoAppTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string SoId
        {
            get { return Convert.ToString(GetData(SalesRlSoAppTable.C_SO_ID)); }
            set { SetData(SalesRlSoAppTable.C_SO_ID, value); }
        }
		
        [DataMember]
        public string SoItemId
        {
            get { return Convert.ToString(GetData(SalesRlSoAppTable.C_SO_ITEM_ID)); }
            set { SetData(SalesRlSoAppTable.C_SO_ITEM_ID, value); }
        }

        [DataMember]
        public decimal SoItemQty
        {
            get { return Convert.ToDecimal(GetData(SalesRlSoAppTable.C_SO_ITEM_QTY)); }
            set { SetData(SalesRlSoAppTable.C_SO_ITEM_QTY, value); }
        }
		
        [DataMember]
        public string AppId
        {
            get { return Convert.ToString(GetData(SalesRlSoAppTable.C_APP_ID)); }
            set { SetData(SalesRlSoAppTable.C_APP_ID, value); }
        }
		
        [DataMember]
        public string AppItemId
        {
            get { return Convert.ToString(GetData(SalesRlSoAppTable.C_APP_ITEM_ID)); }
            set { SetData(SalesRlSoAppTable.C_APP_ITEM_ID, value); }
        }

        [DataMember]
        public decimal AppItemQty
        {
            get { return Convert.ToDecimal(GetData(SalesRlSoAppTable.C_APP_ITEM_QTY)); }
            set { SetData(SalesRlSoAppTable.C_APP_ITEM_QTY, value); }
        }
		
		#endregion
	}
	
	
}	

